package cn.edu.hitwh.resume.web.controller.vo;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;

import cn.edu.hitwh.resume.dal.entity.SeekerDo;

public class ResumeSearchVo {
	private Integer id;
	private Integer workage;
	private String major;
	private Integer degree;
	private String school;
	private String skill;
	private String position;
	private String city;
	private Integer jobType;
	
	public ResumeSearchVo() {
		super();
	}

	public ResumeSearchVo(Integer id, Integer workage, String major,
			Integer degree, String school, String skill, String position,
			String city, Integer jobType) {
		super();
		this.id = id;
		this.workage = workage;
		this.major = major;
		this.degree = degree;
		this.school = school;
		this.skill = skill;
		this.position = position;
		this.city = city;
		this.jobType = jobType;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getWorkage() {
		return workage;
	}

	public void setWorkage(Integer workage) {
		this.workage = workage;
	}

	public String getMajor() {
		return major;
	}

	public void setMajor(String major) {
		this.major = major;
	}

	public Integer getDegree() {
		return degree;
	}

	public void setDegree(Integer degree) {
		this.degree = degree;
	}

	public String getSchool() {
		return school;
	}

	public void setSchool(String school) {
		this.school = school;
	}

	public String getSkill() {
		return skill;
	}

	public void setSkill(String skill) {
		this.skill = skill;
	}

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public Integer getJobType() {
		return jobType;
	}

	public void setJobType(Integer jobType) {
		this.jobType = jobType;
	}
	
	@Override
	public int hashCode() {
		return new HashCodeBuilder(getId() % 2 == 0 ? getId() + 1 : getId(), 31).toHashCode();
	}

	@Override
	public boolean equals(Object obj) {
		if (null == obj) {
			return false;
		}
		if (this == obj) {
			return true;
		}
		if (this.getClass() != obj.getClass()) {
			return false;
		}
		SeekerDo s = (SeekerDo) obj;
		return new EqualsBuilder().append(getId(), s.getId()).isEquals();
	}

}
